// Copyright 2008 Roberto Chiaretti
//
// This file is part of JProxyBuilder.
//
// JProxyBuilder is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// JProxyBuilder is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.

// You should have received a copy of the GNU Lesser General Public License
// along with JProxyBuilder.  If not, see <http://www.gnu.org/licenses/>.

package org.altervista.cp.thinbcgen.proxy.test;

import org.apache.bcel.Repository;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.util.BCELifier;

class BCELifierRunner {

	public static void main(String[] args) throws Exception {
		Class<?> c = TargetProxy.class;

		JavaClass template = Repository.lookupClass(c);

		String path = c.getClassLoader().getResource(".").getPath()
				+ "../src/java/" + c.getName().replace('.', '/')
				+ "Creator.java";

		java.io.FileOutputStream out = new java.io.FileOutputStream(path);
		new BCELifier(template, out).start();
		out.close();

	}
}